home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / GraphicsCards / StormMesa / include / GL / wmesa.h < prev    next >
C/C++ Source or Header  |  1998-12-15  |  4KB  |  147 lines

  1. /* $Id: wmesa.h,v 3.0 1998/02/20 05:06:59 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  3.0
  6.  * Copyright (C) 1995-1998  Brian Paul
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  *
  22.  */
  23.  
  24.  
  25. /*
  26.  * $Log: wmesa.h,v $
  27.  * Revision 3.0  1998/02/20 05:06:59  brianp
  28.  * initial rev
  29.  *
  30.  */
  31.  
  32.  
  33. /*
  34.  * Windows driver by: Mark E. Peterson (markp@ic.mankato.mn.us)
  35.  * Updated by Li Wei (liwei@aiar.xjtu.edu.cn)
  36.  *
  37.  *
  38.  ***************************************************************
  39.  *                     WMesa                                   *
  40.  *                     version 2.3                             *    
  41.  *                                                             *
  42.  *                        By                                   *
  43.  *                      Li Wei                                 *
  44.  *       Institute of Artificial Intelligence & Robotics       *
  45.  *       Xi'an Jiaotong University                             *
  46.  *       Email: liwei@aiar.xjtu.edu.cn                         * 
  47.  *       Web page: http://sun.aiar.xjtu.edu.cn                 *
  48.  *                                                             *
  49.  *           July 7th, 1997                       *
  50.  ***************************************************************
  51.  */
  52.  
  53.  
  54. #ifndef WMESA_H
  55. #define WMESA_H
  56.  
  57.  
  58. #ifdef __cplusplus
  59. extern "C" {
  60. #endif
  61.  
  62.  
  63. #include <windows.h>
  64. #include "gl\gl.h"
  65.  
  66. #pragma warning (disable:4273)
  67. #pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
  68. #pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
  69. #pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
  70. #pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
  71. #pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
  72. #pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
  73. #if (MESA_WARNQUIET>1)
  74. #    pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
  75. #endif
  76.  
  77. /*
  78.  * This is the WMesa context 'handle':
  79.  */
  80. typedef struct wmesa_context *WMesaContext;
  81.  
  82.  
  83.  
  84. /*
  85.  * Create a new WMesaContext for rendering into a window.  You must
  86.  * have already created the window of correct visual type and with an
  87.  * appropriate colormap.
  88.  *
  89.  * Input:
  90.  *         hWnd - Window handle
  91.  *         Pal  - Palette to use
  92.  *         rgb_flag - GL_TRUE = RGB mode,
  93.  *                    GL_FALSE = color index mode
  94.  *         db_flag - GL_TRUE = double-buffered,
  95.  *                   GL_FALSE = single buffered
  96.  *
  97.  * Note: Indexed mode requires double buffering under Windows.
  98.  *
  99.  * Return:  a WMesa_context or NULL if error.
  100.  */
  101. extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
  102.                                        GLboolean rgb_flag,GLboolean db_flag);
  103.  
  104.  
  105. /*
  106.  * Destroy a rendering context as returned by WMesaCreateContext()
  107.  */
  108. /*extern void WMesaDestroyContext( WMesaContext ctx );*/
  109. extern void WMesaDestroyContext( void );
  110.  
  111.  
  112. /*
  113.  * Make the specified context the current one.
  114.  */
  115. extern void WMesaMakeCurrent( WMesaContext ctx );
  116.  
  117.  
  118. /*
  119.  * Return a handle to the current context.
  120.  */
  121. extern WMesaContext WMesaGetCurrentContext( void );
  122.  
  123.  
  124. /*
  125.  * Swap the front and back buffers for the current context.  No action
  126.  * taken if the context is not double buffered.
  127.  */
  128. extern void WMesaSwapBuffers(void);
  129.  
  130.  
  131. /*
  132.  * In indexed color mode we need to know when the palette changes.
  133.  */
  134. extern void WMesaPaletteChange(HPALETTE Pal);
  135.  
  136. extern void WMesaMove(void);
  137.  
  138.  
  139.  
  140. #ifdef __cplusplus
  141. }
  142. #endif
  143.  
  144.  
  145. #endif
  146.  
  147.